package com.hfzy.ihk.web.linkcall.context;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;

public class Context {

	public  static ContextIntf contextIntf;

	private static ApplicationContext appContext;

	@Autowired
	public static void setContextIntf(ContextIntf contextIntf) {
		Context.contextIntf = contextIntf;
	}

	public static ContextIntf getContextIntf() {
		return contextIntf;
	}

	public static void setAppContext(ApplicationContext appContext) {
		Context.appContext = appContext;
	}

	public static ApplicationContext getAppContext() {
		return appContext;
	}

	public static Object get(ContextKey key) {
		return contextIntf.get(key);
	}

	public static void set(ContextKey key, Object obj) {
		contextIntf.set(key, obj);
	}

	public static void remove(ContextKey key) {
		contextIntf.remove(key);
	}

	public static void clearAll() {
		contextIntf.clearAll();
	}

}
